Use the double variant instead.
* position of the device that holds the grab.
*/
if (impl->position_method == POSITION_METHOD_NONE && grab_device)
- gdk_surface_get_device_position (transient_for, grab_device,
- &surface->x, &surface->y, NULL);
+ {
+ double px, py;
+ gdk_surface_get_device_position_double (transient_for, grab_device,
+ &px, &py, NULL);
+ surface->x = round (px);
+ surface->y = round (py);
+ }
}
else
{
gdouble *axes,
GdkModifierType *mask)
{
- gint x_int, y_int;
+ double x, y;
- gdk_surface_get_device_position (window, device, &x_int, &y_int, mask);
+ gdk_surface_get_device_position_double (window, device, &x, &y, mask);
if (axes)
{
- axes[0] = x_int;
- axes[1] = y_int;
+ axes[0] = round (x);
+ axes[1] = round (y);
}
}